﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace YaP.Library.YapControls
{
    public partial class MainPreviewer : UserControl
    {
        public MainPreviewer()
        {
            InitializeComponent();
        }

        private void itmClick(object sender, EventArgs e)
        {
            statusStrip.BackColor = SystemColors.Control;
            sideBar.BackColor = SystemColors.Control;
            backMdi.BackColor = SystemColors.Control;
            ((Control)sender).BackColor = Color.DarkRed;
            EventArgs ev = new EventArgs();
            switch (((Control)sender).Name)
            {
                case "backMdi":
                    OnBackMdiClicked(this, ev);
                    break;
                case "statusStrip":
                    OnStatusClicked(this, ev);
                    break;
                case "sideBar":
                    OnSideBarClicked(this, ev);
                    break;
            }
        }

        public delegate void SideBarClicked(object sender, EventArgs e);

        public delegate void StatusClicked(object sender, EventArgs e);

        public delegate void BackMdiClicked(object sender, EventArgs e);

        public event BackMdiClicked OnBackMdiClicked;
        public event StatusClicked OnStatusClicked;
        public event SideBarClicked OnSideBarClicked;
    }
}
